// JavaScript Document by Michael J. Ihrig
var num = 0;

function awardBadge(inID, imgID){
	var chk = document.getElementById(inID).checked;
	if (!chk) {
		document.getElementById(imgID).src="images/badge_default.png";
		minus ('element1','6.25');
		if (num != 0){
			num--;
			setFraction();
		}
	}
	else if (chk){
		document.getElementById(imgID).src="images/" + imgID + ".png";
		plus ('element1','6.25');
		num++;
		setFraction();
	}
	
}

function setFraction()
{
    document.getElementById('frac').innerHTML = "<strong>(" + num + " of 16 Badges Collected)</strong>";
}